package com.parking.gateway.util;

import org.springframework.util.AntPathMatcher;

import java.util.List;

public class StringMatchUtil {
    private static AntPathMatcher pathMatcher = new AntPathMatcher();

    public static boolean match(String path, List<String> paths){
        if(paths==null||paths.isEmpty()) return false;
        for (String s : paths) {
            if(pathMatcher.match(s,path)) return true;
        }
        return false;
    }
}
